package ch04Spring.demo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo6 {
    public void testHelloSpring() {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        HelloSpring helloSpring = (HelloSpring) context.getBean("helloSpring");
        helloSpring.print();
    }

    public static void main(String[] args) {
        Demo6 demo6 = new Demo6();
        demo6.testHelloSpring();

    }
}
